Skip to content

chore: add colour to the advisory generation output.#109

Merged
G-Rath merged 13 commits into
mainfrom
chore/colourize-generate-osv-advisories
Oct 29, 2025
Merged

chore: add colour to the advisory generation output.#109
G-Rath merged 13 commits into
mainfrom
chore/colourize-generate-osv-advisories

Conversation

@Unifex

@Unifex Unifex commented Jul 16, 2025

Copy link
Copy Markdown
Collaborator

I find the output from the Advisory generation to be an unreadable wall of text.

This adds a scattering of colour to the notices for SAs that have had an action applied to them.

This is manage through the addition of Colorama. I selected this one as it manages the colours and styles while taking into account the platform it's run on, is actively maintained, and has been around for more than a decade.

image

I note that the poetry.lock has an unexpected removal. Could this be because it is included via the new Colourama?

@Unifex Unifex self-assigned this Jul 16, 2025
@Unifex Unifex force-pushed the chore/colourize-generate-osv-advisories branch from 8cfdbdc to 8093324 Compare July 16, 2025 22:39

@G-Rath G-Rath left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good stuff - I'm on the fence about the specific colors as e.g. it's not really a success that we've patched an advisory because we don't want to be doing that, but lets roll with what you've got for now.

I think it would be best if we used f-strings where possible instead of appending so if you could change that it'd be great (though I'm ok leaving the "skipping patching" message if that turns out to be a pain having an f-string in an f-string...)

Comment thread poetry.lock
Comment thread scripts/generate_osv_advisories.py Outdated
Comment thread scripts/generate_osv_advisories.py Outdated
Comment thread pyproject.toml Outdated
@Unifex Unifex force-pushed the chore/colourize-generate-osv-advisories branch from 3acf654 to 1f6a712 Compare August 20, 2025 21:15
@Unifex Unifex requested a review from G-Rath August 20, 2025 21:21
Comment thread scripts/helpers/text_is.py
Comment thread scripts/helpers/text_is.py
@Unifex Unifex force-pushed the chore/colourize-generate-osv-advisories branch from febb921 to 43f7092 Compare October 29, 2025 00:44
@Unifex

Unifex commented Oct 29, 2025

Copy link
Copy Markdown
Collaborator Author

Woot! Super Green!

@Unifex Unifex requested a review from G-Rath October 29, 2025 02:10

@G-Rath G-Rath left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome stuff!

@G-Rath G-Rath merged commit a998176 into main Oct 29, 2025
9 checks passed
@G-Rath G-Rath deleted the chore/colourize-generate-osv-advisories branch October 29, 2025 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants